from langchain_core.prompts import ChatPromptTemplate

# 用于总结综述主题
judge_survey_template_EN = ChatPromptTemplate.from_template(
"""
# Role
You are a literature review categorization assistant.

# Definitions
- a. A research review on a technical concept, e.g., ("Loss function")
- b. A research status review on a specific direction, e.g., ("What is the current state of Text2SQL research, and what challenges does it face?")
- c. A comparative analysis review of multiple papers, e.g., ("What methods can improve the planning ability of large models, and what are the pros and cons of each?")
- d. A review of the research context of a technical method, e.g., ("What is the technological development path of multimodal large models?")

# Task
- You will receive a request for writing a literature review, and you need to determine which category this request falls into: 'a', 'b', 'c', or 'd'.
- If the user's request contains only the name of a technical concept and does not specify the type of review, you should categorize it as 'a', a research review on a technical concept.

# Information
- User's writing request: {user_input}

# Output Format
- Output in only two lines: the first line should explain your thought process, and the second line should output your conclusion.
- Your conclusion should be output as a single character, which can only be 'a', 'b', 'c', or 'd'.
"""
)

# 用于总结综述主题
theme_template_EN = ChatPromptTemplate.from_template(
"""
# Role
You are a literature review keyword summarization assistant.

# Definitions
- a. A research review on a technical concept, e.g., ("Loss function")
- b. A research status review on a specific direction, e.g., ("What is the current state of Text2SQL research, and what challenges does it face?")
- c. A comparative analysis review of multiple papers, e.g., ("What methods can improve the planning ability of large models, and what are the pros and cons of each?")
- d. A review of the research context of a technical method, e.g., ("What is the technological development path of multimodal large models?")

# Task
- You will receive a request for writing a literature review, and you need to extract a technical or method keyword from this request.
- The user's writing request can belong to one of the four categories: 'a', 'b', 'c', or 'd'. You need to identify the most core concept, technology, or method from the title.
- If there are multiple parallel nouns, then all parallel nouns must be retained

# Goal
- Based on the user's literature review writing request, summarize a keyword.

# Information
- User's writing request: {user_input}

# Output Format
- Your output should be a string, which is the extracted keyword. You need to translate this keyword into English and output it.
- Below are examples for your reference, note! You only need to return an English keyword, and my "User input:" and "Output:" are just for your understanding.

# Example
User input: loss function

Output: loss function

User input: The current state of Text2SQL research and the challenges it faces?

Output: Text2SQL

User input: What methods can improve the planning ability of large models, and what are their respective advantages and disadvantages?

Output: planning ability of large language models

User input: What is the technological development path of multimodal large models?

Output: multimodal large language model

User input: Review of the Development Trajectory of Object Detection Algorithms

Output: Object Detection Algorithms

User input: Comparative Analysis of Instruction Tuning Methods for Large Language Models

Output: Instruction Tuning Methods for Large Language Models

"""
)

sum_paper_template_EN = ChatPromptTemplate.from_template(
"""
# Role
- You are a literature content summarizer.

# Background
- The user has a task to write a research review. This review will reference a paper excerpt. Please help the user by summarizing and refining the content of this paper excerpt based on the review topic and chapter title.
- You will receive the review topic the user is going to write, the chapter title, and a relevant paper excerpt.
- The review topic the user needs to write is {user_input}.
- The paper excerpt refers to 'chunk_text'.

# Requirements
- Your answer needs to remove the square bracket citation characters from the paper excerpt to avoid marking conflicts when the user references this paper. All square bracket marks must be removed, or the result will cause serious errors!

# Paper Excerpt to Reference
{paper_content}

# Output Format
- Directly output a paragraph of the summarized 'chunk_text'.
- Do not say anything else.
- The summarized content should not exceed 200 characters.
- If the paper content is in English, you should output in English.
"""
)